Package-level declarations

Types

Link copied to clipboard
data class ConfidenceFact(val fact: PrologFact)

A confidence fact that accompanies a main fact. Allows Prolog rules to filter by confidence threshold.

Link copied to clipboard
class DefaultPrologProjector(graphProjector: GraphProjector? = null, prologSchema: PrologSchema = PrologSchema.withDefaults(), includeConfidence: Boolean = true, includeGrounding: Boolean = true) : PrologProjector

Default implementation of PrologProjector.

Link copied to clipboard
data class GroundingFact(val fact: PrologFact, val propositionId: String)

A grounding fact that links a Prolog fact back to its source proposition. Enables provenance queries.

Link copied to clipboard
data class PredicateMapping(val relationshipType: String, val predicate: String, val subjectArgIndex: Int = 0, val objectArgIndex: Int = 1)

Maps a relationship type from the schema to a Prolog predicate.

Link copied to clipboard

Prolog engine for executing queries against a knowledge base. Wraps tuProlog to provide a simple interface for loading theories and running queries.

Link copied to clipboard
data class PrologFact(val predicate: String, val args: List<String>, val confidence: Double, val decay: Double = 0.0, val sourcePropositionIds: List<String>) : Projection

A Prolog fact projected from a proposition. Facts are ground terms (no variables) that represent knowledge.

Link copied to clipboard
data class PrologProjectionResult(val facts: List<PrologFact>, val confidenceFacts: List<ConfidenceFact>, val groundingFacts: List<GroundingFact>)

Result of projecting propositions to Prolog.

Link copied to clipboard

Projects propositions to Prolog facts for logical inference.

Link copied to clipboard

Loads Prolog rules from files or classpath resources.

Link copied to clipboard
class PrologSchema(mappings: List<PredicateMapping>, baseRules: String = "")

Schema defining how relationships map to Prolog predicates. Also holds base inference rules.

Link copied to clipboard
data class QueryResult(val success: Boolean, val bindings: Map<String, String> = emptyMap())

Query result from Prolog engine.

Properties

Link copied to clipboard

Well-known path for DICE Prolog rules on the classpath.